<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form method="post" th:action="@{/student/displayCourse}" th:object="${studentInfo}">
        <h1 >选课界面</h1>
        <input hidden type="text" th:field="*{name}" />
        <input hidden type="text" th:field="*{sno}" />
        <input hidden type="text" th:field="*{grade}" />
        <input hidden type="text" th:field="*{department}" />
        <input hidden type="text" th:field="*{academy}" />
        <div class="col-sm-9">
            <label th:each="course:${studentInfo.course}" class="check-box">
            <input id="course" name="course" type="checkbox" th:value="${course.kch}" th:text="${course.kch}"><br>
            </label>
        </div>
        <input type="submit" value="提交已选课程">
</form>
</body>
</html>